home *** CD-ROM | disk | FTP | other *** search
/ Young Minds / Young Minds Interactive CD-ROM.ISO / rogue / main.c < prev    next >
Encoding:
C/C++ Source or Header  |  1987-05-13  |  761 b   |  40 lines

  1. /*
  2.  * main.c
  3.  *
  4.  * This source herein may be modified and/or distributed by anybody who
  5.  * so desires, with the following restrictions:
  6.  *    1.)  No portion of this notice shall be removed.
  7.  *    2.)  Credit shall not be taken for the creation of this source.
  8.  *    3.)  This code is not to be traded, sold, or used for personal
  9.  *         gain or profit.
  10.  *
  11.  */
  12.  
  13. #include "rogue.h"
  14.  
  15. extern short party_room;
  16.  
  17. main(argc, argv)
  18. int argc;
  19. char *argv[];
  20. {
  21.     if (init(argc, argv)) {        /* restored game */
  22.         goto PL;
  23.     }
  24.  
  25.     for (;;) {
  26.         clear_level();
  27.         make_level();
  28.         put_objects();
  29.         put_stairs();
  30.         add_traps();
  31.         put_mons();
  32.         put_player(party_room);
  33.         print_stats(STAT_ALL);
  34. PL:        
  35.         play_level();
  36.         free_stuff(&level_objects);
  37.         free_stuff(&level_monsters);
  38.     }
  39. }
  40.